package com.yifei.exception;

import com.yifei.model.result.IResultCode;
import lombok.Getter;


/**
 * @Description: 自定义业务异常类
 * @Author: yiFei
 * @date: 2022/11/4 13:50
 */
@Getter
public class ServiceException extends RuntimeException {

    public IResultCode resultCode;

    public ServiceException(IResultCode errorCode) {
        super(errorCode.getMsg());
        this.resultCode = errorCode;
    }

    public ServiceException(String message){
        super(message);
    }

    public ServiceException(String message, Throwable cause){
        super(message, cause);
    }

    public ServiceException(Throwable cause){
        super(cause);
    }


}